package com.jinghua.treatment.service.impl;

import com.jinghua.treatment.entity.SysInquiryAnswers;
import com.jinghua.treatment.entity.SysInquiryAnswersExample;
import com.jinghua.treatment.mapper.SysInquiryAnswersMapper;
import com.jinghua.treatment.service.SysInquiryAnswersService;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by 王兴光 on 2018/5/24.
 */
@Service
public class SysInquiryAnswersServiceImpl implements SysInquiryAnswersService {
    @Resource
    private SysInquiryAnswersMapper inquiryAnswersMapper;
    @Override
    public int countByDoctor(Integer doctorId) {
        SysInquiryAnswersExample example = new SysInquiryAnswersExample();
        SysInquiryAnswersExample.Criteria criteria = example.createCriteria();

        example.getOredCriteria().add(criteria.andDoctorIdEqualTo(doctorId));
        return inquiryAnswersMapper.countByExample(example);
    }

    @Override
    public int deleteByExample(SysInquiryAnswersExample example) {
        return 0;
    }

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return 0;
    }

    @Override
    public int insert(SysInquiryAnswers record) {
        return 0;
    }

    @Override
    public int insertSelective(SysInquiryAnswers record) {
        return inquiryAnswersMapper.insertSelective(record);
    }

    @Override
    public List<SysInquiryAnswers> selectByExample(SysInquiryAnswersExample example) {
        return inquiryAnswersMapper.selectByExample(example);
    }

    @Override
    public List<SysInquiryAnswers> selectByPatientId(Integer patientId) {
        return inquiryAnswersMapper.selectByPatientId(patientId);
    }

    @Override
    public SysInquiryAnswers selectByPrimaryKey(Integer id) {
        return inquiryAnswersMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByExampleSelective(@Param("record") SysInquiryAnswers record, @Param("example") SysInquiryAnswersExample example) {
        return 0;
    }

    @Override
    public int updateByExample(@Param("record") SysInquiryAnswers record, @Param("example") SysInquiryAnswersExample example) {
        return 0;
    }

    @Override
    public int updateByPrimaryKeySelective(SysInquiryAnswers record) {
        return 0;
    }

    @Override
    public int updateByPrimaryKey(SysInquiryAnswers record) {
        return 0;
    }
}
